package sis.ra.evaluation;

import java.util.HashMap;

import sis.ra.utility.Utils;


public class verbProbobility {
	//verbpropDistantFreq5.txt
	public static HashMap<String, Double> getVerbsDistantWeighFreq3()
	{
		HashMap<String, Double> verbs=new HashMap<String, Double>();
		String file="C:\\Documents and Settings\\I820753\\Desktop\\dataset\\verbpropDistantFreq3.txt";
		String contents=Utils.readFile(file);
	//	System.out.println(contents);
		String [] lines=contents.split("\n");
		for (int i=0;i<lines.length;i++)
		{
			String verb=lines[i].split("\t")[0];
			if (verb.length()<2) continue;
			Double score=Double.parseDouble(lines[i].split("\t")[1]);
			verbs.put(verb, score);
		}
		return verbs;
	}
	
	//verbpropDistantFreq5.txt
	public static HashMap<String, Double> getVerbsDistantWeighFreq5()
	{
		HashMap<String, Double> verbs=new HashMap<String, Double>();
		String file="C:\\Documents and Settings\\I820753\\Desktop\\dataset\\verbpropDistantFreq5.txt";
		String contents=Utils.readFile(file);
	//	System.out.println(contents);
		String [] lines=contents.split("\n");
		for (int i=0;i<lines.length;i++)
		{
			String verb=lines[i].split("\t")[0];
			if (verb.length()<2) continue;
			Double score=Double.parseDouble(lines[i].split("\t")[1]);
			verbs.put(verb, score);
		}
		return verbs;
	}
	
	//verbPropProductVerbDist.txt
	public static HashMap<String, Double> getVerbsProductDistantWeigh()
	{
		HashMap<String, Double> verbs=new HashMap<String, Double>();
		String file="C:\\Documents and Settings\\I820753\\Desktop\\dataset\\verbPropProductVerbDist.txt";
		String contents=Utils.readFile(file);
	//	System.out.println(contents);
		String [] lines=contents.split("\n");
		for (int i=0;i<lines.length;i++)
		{
			String verb=lines[i].split("\t")[0];
			if (verb.length()<2) continue;
			Double score=Double.parseDouble(lines[i].split("\t")[1]);
			verbs.put(verb, score);
		}
		return verbs;
	}
	
	public static HashMap<String, Double> getPMIWeight()
	{
		HashMap<String, Double> verbs=new HashMap<String, Double>();
		String file="C:\\Documents and Settings\\I820753\\Desktop\\dataset\\pmiWeight.txt";
		String contents=Utils.readFile(file);
	//	System.out.println(contents);
		String [] lines=contents.split("\n");
		for (int i=0;i<lines.length;i++)
		{
			String verb=lines[i].split("\t")[0];
			if (verb.length()<2) continue;
			Double score=Double.parseDouble(lines[i].split("\t")[3]);
			verbs.put(verb, score);
		}
		return verbs;
	}
	
	public static HashMap<String, Double> getVerbsDistantWeigh()
	{
		HashMap<String, Double> verbs=new HashMap<String, Double>();
		String file="C:\\Documents and Settings\\I820753\\Desktop\\dataset\\verbpropDistant.txt";
		String contents=Utils.readFile(file);
	//	System.out.println(contents);
		String [] lines=contents.split("\n");
		for (int i=0;i<lines.length;i++)
		{
			String verb=lines[i].split("\t")[0];
			if (verb.length()<2) continue;
			Double score=Double.parseDouble(lines[i].split("\t")[1]);
			verbs.put(verb, score);
		}
		return verbs;
	}
	public static HashMap<String, Double> getVerbFreqDist()
	{
		HashMap<String, Double> verbs=new HashMap<String, Double>();
		String file="C:\\Documents and Settings\\I820753\\Desktop\\dataset\\verbFreqDist.txt";
		String contents=Utils.readFile(file);
	//	System.out.println(contents);
		String [] lines=contents.split("\n");
		for (int i=0;i<lines.length;i++)
		{
			String verb=lines[i].split("\t")[0];
			if (verb.length()<2) continue;
			Double score=Double.parseDouble(lines[i].split("\t")[1]);
			verbs.put(verb, score);
		}
		return verbs;
	}
	public static HashMap<String, Double> getVerbs()
	{
		HashMap<String, Double> verbs=new HashMap<String, Double>();
		String file="C:\\Documents and Settings\\I820753\\Desktop\\dataset\\verbprop.txt";
		String contents=Utils.readFile(file);
	//	System.out.println(contents);
		String [] lines=contents.split("\n");
		for (int i=0;i<lines.length;i++)
		{
			String verb=lines[i].split("\t")[0];
			if (verb.length()<2) continue;
			Double score=Double.parseDouble(lines[i].split("\t")[1]);
			verbs.put(verb, score);
		}
		return verbs;
	}
	public static void main(String[] args) {
		
	}

}
